﻿#ifndef REGISTER_H
#define REGISTER_H
#include"global.h"
#include <QWidget>
#include "readersql.h"
#include <QLabel>
#include <QPaintEvent>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QGraphicsDropShadowEffect>
#include <QGraphicsOpacityEffect>
#include <QGraphicsEffect>
#include <QPropertyAnimation>
#include <QParallelAnimationGroup>
#include <QSequentialAnimationGroup>
#include"customwidget.h"
class SheildLayer ;
namespace Ui {
class Register;
}

class Register : public QWidget
{
    Q_OBJECT

public:
    explicit Register(QWidget *parent = nullptr);
    ~Register();
    //const int preferWidth=350;
    void SetRadius(int radius);
    void SetName(QString name);

private slots:
    void on_pushButton_clicked();

    void on_ID_textChanged(const QString &arg1);

    void on_closeBtn_clicked();

    //void processRet();

private:
    Ui::Register *ui;
    int cornerRadius;
    QString pageName;
    QWidget * bgWidget;
    SheildLayer * sheildLayer;

    bool onShown=false;
    QParallelAnimationGroup * curAni=nullptr;
    QGraphicsOpacityEffect * opacity;
    QPoint parentPos;

    messageInputItem * _ID;
    messageInputItem * _password;
    messageInputItem * _name;
    messageInputItem * _age;
    messageInputItem * _grade;
    messageInputItem * _major;
    messageInputItem * _student;
    messageInputItem * _phone;
    messageInputItem * _email;

signals:
    void sizeChange();
public slots:
    void sildeIn();
    void sildeOut();
};

#endif // REGISTER_H
